public class Test {
    public static void main(String[] args) {
        //入栈操作
        MyStack stack = new MyStack();
        stack.push(10);
        stack.push(20);
        stack.push(30);
        //拿到栈顶元素，不弹出
        int top = stack.peek();
        System.out.println(top);
        //栈的元素个数
        int num = stack.getSize();
        System.out.println("栈的元素个数为："+num);
        //弹出栈的所有元素
        int i = stack.pop();
        int i1 = stack.pop();
        int i2 = stack.pop();
        System.out.println(i+" "+i1+" "+i2);
        //再次打印栈的个数
        num = stack.getSize();
        System.out.println("栈的元素个数为："+num);
        MinStack minStack = new MinStack();
        //在最小栈中放入元素
        minStack.push(6);
        minStack.push(5);
        minStack.push(8);
        minStack.push(10);
        minStack.push(3);
        //获取出最小元素
        int min = minStack.getMin();
        System.out.println(min);
    }
}
